package com.zx.oa.service.student;

import com.zx.oa.dao.student.StudentDao;
import com.zx.oa.dao.student.StudentDaoImpl;
import com.zx.oa.entity.ShowStudent;
import com.zx.oa.entity.Student;

import java.util.List;

public class StudentServiceImpl implements StudentService{

    StudentDao studentDao=new StudentDaoImpl();

    @Override
    public List<ShowStudent> getStudentList(String name, String className, String major, int currentPageNo, int pageSize) {
        return studentDao.getStudentList( name, className,  major, currentPageNo, pageSize);
    }

    @Override
    public int getStudentTotalCount(String name, String className, String major) {
        return studentDao.getStudentTotalCount( name,  className,  major);
    }

    @Override
    public boolean addStudent(Student student) {
        return studentDao.addStudent(student);
    }

    @Override
    public boolean getClassInfoCount(int classId) {
        return studentDao.getClassInfoCount(classId);
    }

    @Override
    public List<ShowStudent> getStudentListAll(String name, String className, String major) {
        return studentDao.getStudentListAll( name,  className,  major);
    }

    @Override
    public boolean delStudent(Integer id) {
        return studentDao.delStudent(id);
    }

    @Override
    public Student getStudentById(Integer id) {
        return studentDao.getStudentById(id);
    }

    @Override
    public boolean modifyStudent(Student student) {
        return studentDao.modifyStudent(student);
    }
}
